# -*- coding: utf-8 -*-
# @Time    : 2022/6/26 15:35
# @Author  : 我还能卷
# @FileName: logger.py
# @Software: PyCharm
# -----------------------------------------------
from loguru import logger

from config import config


def get_log(sink='smart_home.log', rotation='5 MB'):
    logger.add(sink=sink, encoding='utf-8',
               rotation=rotation)
    return logger

log = get_log(config.LOG_FILE)
print(log)
